package com.mallcloud.mall.mall.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Optional;

@ApiModel(value = "ProParkingCouponWriteOff", description = "停车券-核销过程")
@Data
@ToString
public class ProParkingCouponWriteOff {

	@ApiModelProperty("券序号")
	private String couponId;
	@ApiModelProperty("券抵扣券金额")
	private String couponRedeemAmount;
	@ApiModelProperty("门店号")
	private String storeNo;

	@ApiModelProperty(value = "返回id 0-核销成功，1-核销失败", hidden = true)
	private Integer messageId;
	@ApiModelProperty(value = "执行提示信息", hidden = true)
	private String message;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(1)).orElse(false);
	}
}
